<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>

<script>
    function formatUrlParams(data) {
        return new URLSearchParams(data).toString()
    }

    const str = 'service=ajax&page=saleactive.SaleActiveRuleCheckNew&listener=checkSaleActiveRule&LOGIN_LOG_ID=&m=crmN313&p=saleactive.SaleActiveRuleCheckNew&partids=QueryListPart&jwcpaths=QueryListPart'
    const params = {
        service: 'ajax',
        page: 'saleactive.SaleActiveRuleCheckNew',
        listener: 'checkSaleActiveRule',
        LOGIN_LOG_ID: '',
        m: 'crmN313',
        p: 'saleactive.SaleActiveRuleCheckNew',
        partids: 'QueryListPart',
        jwcpaths: 'QueryListPart'
    }
    console.log(formatUrlParams(params))
    console.log(str)
</script>
